<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        const user = { name: "Lydia", age: 21 };
        const admin = { admin: true, ...user };
        console.log(admin);

        const numbers = [1, 2, 3, 4, 5];
        const [y] = numbers; // 解构赋值 1
        console.log(y);
        const { name: myName } = { name: "Lydia" }; // 解构赋值 2
        console.log(name);

    </script>
</body>

</html>